package com.consumer.demo2;

import com.consumer.myrule.MySelfRule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;

/**
 * 在启动该微服务的时候就能够加载我们的自定义Ribbon配置类，从而使配置生效
 * 该配置类不能放在组件扫描@ComponentScan所扫描的当前包下及子包下，否则会被所有的Ribbon客户端共享，达不到特殊化定制的目的
 */
@RibbonClient(name="MICROSERVICECLOUD-DEPT",configuration = MySelfRule.class)
@EnableEurekaClient
@SpringBootApplication
public class Demo2Application {

	public static void main(String[] args) {
		SpringApplication.run(Demo2Application.class, args);
	}
}
